import { MutableRefObject } from 'react';
import { extendApi } from '@inbiz/utils'
import type { TimeLineProps } from './index';

export default extendApi((_events: MutableRefObject<TimeLineProps['callBackEvents']>, params) => {
  const { setState, data } = params;
  return {
    getData: () => {
      return data || [];
    },
    loadData: (data = []) => {setState(data);}
  };
});
